import request from '@/utils/request'

// 查询仓库列表
export function listStoreInfo(query) {
  return request({
    url: '/business/store/list',
    method: 'get',
    params: query
  })
}

// 查询仓库列表（排除节点）
export function listStoreInfoExcludeChild(storeId) {
  return request({
    url: '/business/store/list/exclude/' + storeId,
    method: 'get'
  })
}

// 查询仓库详细
export function getStoreInfo(storeId) {
  return request({
    url: '/business/store/' + storeId,
    method: 'get'
  })
}

// 新增仓库
export function addStoreInfo(data) {
  return request({
    url: '/business/store',
    method: 'post',
    data: data
  })
}

// 修改仓库
export function updateStoreInfo(data) {
  return request({
    url: '/business/store',
    method: 'put',
    data: data
  })
}

// 删除仓库
export function delStoreInfo(storeId) {
  return request({
    url: '/business/store/' + storeId,
    method: 'delete'
  })
}